<template>
  <a-table :columns="columns" :data-source="data">
    <a slot="name" slot-scope="text">{{ text }}</a>
  </a-table>
</template>
<script>
const columns = [
  {
    title: "头像卡通",
    dataIndex: "avater",
    key: "avater",

  },
  {
    title: "姓名",
    dataIndex: "name",
    key: "name",
    scopedSlots: { customRender: "name" },
  },
  {
    title: "年龄",
    dataIndex: "age",
    key: "age",
  },
  {
    title: "工作年限",
    dataIndex: "workyear",
    key: "workyear",
  },
  {
    title: "职位",
    dataIndex: "position",
    key: "position",
  },
  {
    title: "学历",
    dataIndex: "learn",
    key: "learn",
    ellipsis: true,
  },
  {
    title: "地点",
    dataIndex: "place",
    key: "place",
  },
  {
    title: "更新时间",
    dataIndex: "workyear",
    key: "time",
    ellipsis: true,
  },
];

const data = [
  {
    key: "1",
    avater: "男",
    name: "吴桂芳",
    age: "20",
    workyear: "1",
    position: "JAVA工程师",
    learn: "本科",
    place: "北京",
    time: "2015-12-28",
  },
  {
    key: "2",
    avater: "男",
    name: "吴桂芳",
    age: "20",
    workyear: "1",
    position: "JAVA工程师",
    learn: "本科",
    place: "北京",
    time: "2015-12-28",
  },
  {
    key: "3",
    avater: "女",
    name: "吴桂芳",
    age: "20",
    workyear: "1",
    position: "python工程师",
    learn: "本科",
    place: "北京",
    time: "2015-12-28",
  },
];

export default {
  data() {
    return {
      data,
      columns,
    };
  },
};
</script>
